<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="validate.js"></script>
    <title>再次练习表单验证</title>
  </head>
  <body>
    <form action="">
      <span id="password-errors"></span>
      <br />
      输入密码：<input type="text" name="password" />
      <br />
      验证密码：<input type="text" name="confirmPassword" />
      <br />
      <button>提交</button>
    </form>
    <script>
      const passwordValidate = new Validate()
      passwordValidate.confirm_Password('password', 'confirmPassword', `两者密码不一致`, `#password-errors`, `keyup`)
    </script>
  </body>
</html>
